﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class MobileMediaMobileMediaHelperWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(MobileMedia.MobileMediaHelper);
			Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
			
			
			
			
			
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 7, 0, 0);
			Utils.RegisterFunc(L, Utils.CLS_IDX, "new_PickMobileImage", _m_new_PickMobileImage_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "PickMobileImage", _m_PickMobileImage_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "new_TakeMobilePicture", _m_new_TakeMobilePicture_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "TakeMobilePicture", _m_TakeMobilePicture_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "SendAvatar2Server", _m_SendAvatar2Server_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "SendChatImage2Server", _m_SendChatImage2Server_xlua_st_);
            
			
            
			
			
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            return LuaAPI.luaL_error(L, "MobileMedia.MobileMediaHelper does not have a constructor!");
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            return LuaAPI.luaL_error(L, "MobileMedia.MobileMediaHelper does not have a constructor!");
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_new_PickMobileImage_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    int _maxSize = LuaAPI.xlua_tointeger(L, 1);
                    System.Action<UnityEngine.Texture2D, int> _callBack = translator.GetDelegate<System.Action<UnityEngine.Texture2D, int>>(L, 2);
                    
                    MobileMedia.MobileMediaHelper.new_PickMobileImage( _maxSize, _callBack );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_PickMobileImage_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    int _maxSize = LuaAPI.xlua_tointeger(L, 1);
                    System.Action<UnityEngine.Texture2D, int> _callBack = translator.GetDelegate<System.Action<UnityEngine.Texture2D, int>>(L, 2);
                    
                    MobileMedia.MobileMediaHelper.PickMobileImage( _maxSize, _callBack );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_new_TakeMobilePicture_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    int _maxSize = LuaAPI.xlua_tointeger(L, 1);
                    System.Action<UnityEngine.Texture2D, int> _callBack = translator.GetDelegate<System.Action<UnityEngine.Texture2D, int>>(L, 2);
                    
                    MobileMedia.MobileMediaHelper.new_TakeMobilePicture( _maxSize, _callBack );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_TakeMobilePicture_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    int _maxSize = LuaAPI.xlua_tointeger(L, 1);
                    System.Action<UnityEngine.Texture2D, int> _callBack = translator.GetDelegate<System.Action<UnityEngine.Texture2D, int>>(L, 2);
                    
                    MobileMedia.MobileMediaHelper.TakeMobilePicture( _maxSize, _callBack );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SendAvatar2Server_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 4&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<UnityEngine.Texture2D>(L, 2)&& translator.Assignable<System.Action>(L, 3)&& translator.Assignable<System.Action>(L, 4)) 
                {
                    string _url = LuaAPI.lua_tostring(L, 1);
                    UnityEngine.Texture2D _tex = (UnityEngine.Texture2D)translator.GetObject(L, 2, typeof(UnityEngine.Texture2D));
                    System.Action _success = translator.GetDelegate<System.Action>(L, 3);
                    System.Action _fail = translator.GetDelegate<System.Action>(L, 4);
                    
                    MobileMedia.MobileMediaHelper.SendAvatar2Server( _url, _tex, _success, _fail );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<UnityEngine.Texture2D>(L, 2)&& translator.Assignable<System.Action>(L, 3)) 
                {
                    string _url = LuaAPI.lua_tostring(L, 1);
                    UnityEngine.Texture2D _tex = (UnityEngine.Texture2D)translator.GetObject(L, 2, typeof(UnityEngine.Texture2D));
                    System.Action _success = translator.GetDelegate<System.Action>(L, 3);
                    
                    MobileMedia.MobileMediaHelper.SendAvatar2Server( _url, _tex, _success );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<UnityEngine.Texture2D>(L, 2)) 
                {
                    string _url = LuaAPI.lua_tostring(L, 1);
                    UnityEngine.Texture2D _tex = (UnityEngine.Texture2D)translator.GetObject(L, 2, typeof(UnityEngine.Texture2D));
                    
                    MobileMedia.MobileMediaHelper.SendAvatar2Server( _url, _tex );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to MobileMedia.MobileMediaHelper.SendAvatar2Server!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SendChatImage2Server_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 4&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<UnityEngine.Texture2D>(L, 2)&& translator.Assignable<System.Action>(L, 3)&& translator.Assignable<System.Action>(L, 4)) 
                {
                    string _url = LuaAPI.lua_tostring(L, 1);
                    UnityEngine.Texture2D _tex = (UnityEngine.Texture2D)translator.GetObject(L, 2, typeof(UnityEngine.Texture2D));
                    System.Action _success = translator.GetDelegate<System.Action>(L, 3);
                    System.Action _fail = translator.GetDelegate<System.Action>(L, 4);
                    
                    MobileMedia.MobileMediaHelper.SendChatImage2Server( _url, _tex, _success, _fail );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<UnityEngine.Texture2D>(L, 2)&& translator.Assignable<System.Action>(L, 3)) 
                {
                    string _url = LuaAPI.lua_tostring(L, 1);
                    UnityEngine.Texture2D _tex = (UnityEngine.Texture2D)translator.GetObject(L, 2, typeof(UnityEngine.Texture2D));
                    System.Action _success = translator.GetDelegate<System.Action>(L, 3);
                    
                    MobileMedia.MobileMediaHelper.SendChatImage2Server( _url, _tex, _success );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<UnityEngine.Texture2D>(L, 2)) 
                {
                    string _url = LuaAPI.lua_tostring(L, 1);
                    UnityEngine.Texture2D _tex = (UnityEngine.Texture2D)translator.GetObject(L, 2, typeof(UnityEngine.Texture2D));
                    
                    MobileMedia.MobileMediaHelper.SendChatImage2Server( _url, _tex );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to MobileMedia.MobileMediaHelper.SendChatImage2Server!");
            
        }
        
        
        
        
        
        
		
		
		
		
    }
}
